package ru.fsd.sokoban;

import java.awt.image.BufferedImage;


public class Player extends GameObject {

	private int x = 0;
	private int y = 0;
	private BufferedImage leftImg;
	private BufferedImage rightImg;
	
	public Player(BufferedImage rightImg, BufferedImage leftImg) {
		super(5, rightImg);
		this.leftImg = leftImg;
		this.rightImg = rightImg;
	}
	
	public BufferedImage getLeftImg() {
		return leftImg;
	}
	
	public BufferedImage getRightImg() {
		return rightImg;
	}
	
	public int getX() {
		return x;
	}
	
	public int getY() {
		return y;
	}
	
	public void setPos(int x, int y) {
		this.x = x;
		this.y = y;
	}
	
	public void up() {
		y--;
	}
	
	public void down() {
		y++;
	}
	
	public void left() {
		x--;
		setImage(leftImg);
	}
	
	public void right() {
		x++;
		setImage(rightImg);
	}
}
